<?php

defined('__MAPEXEC__') or die('No direct access allowed');

class Maps_Icon_Manager_Yahoo extends Maps_Icon_Manager_Common {
  
  /**
   * Class constructor
   * @param   string  Item Id prefix
   * @param   string  Optional Id of this collection
   * @return  void
   */
  public function __construct($prefix=null, $id='') {
    if ( empty($prefix) ) {
      $prefix = 'icon_yahoo_';
    }
    parent::__construct($prefix, $id);
  }
  
  /**
   * Adds an icon object to this collection.
   * @param   Maps_Icon_Yahoo_Common  Yahoo icon object
   * @return  string                  Icon Id
   */
  public function add(Maps_Icon_Yahoo_Common $icon) {
    $this->addItem($icon);
    return $icon->getId();
  }
  
  /**
   * Creates a new icon object
   * @param   string  Icon type
   * @param   string  Optional base URL for icon images
   * @return  object  Service specific icon object
   */
  public function create($type, $baseURL='') {
    return $this->createIcon('yahoo', $type, $baseURL);
  }
  
}

?>